﻿using Caliburn.Micro;
using ScreenRotateSample.Messages;

namespace ScreenRotateSample.ViewModels
{
    public class DetailsViewModel : Screen
    {
        private readonly INavigationService navigationService;
        private readonly IEventAggregator eventAggregator;

        public DetailsViewModel(INavigationService navigationService, IEventAggregator eventAggregator)
        {
            this.navigationService = navigationService;
            this.eventAggregator = eventAggregator; 
        }


        public void SendMessage()
        {
            eventAggregator.Publish(new SampleMessage("Message"));
        }
    }
}
